
//选中复选框全选或全不选
function checkAll(checkall,subchecked)
{
	var OnOff = checkall.checked;
	var theItem = document.getElementsByName(subchecked); 
	if (theItem!=null)
	{ 
		if (typeof(theItem.value)=='undefined')
		{ 
			for(var i=0,max=theItem.length;i<max;i++)
			{
				var SubItem = theItem[i];
				if(SubItem.disabled==false)
				{ 
					SubItem.checked = OnOff; 
				}
			} 
		}
		else
		{ 
			if(theItem.disabled==false)
			{
				theItem.checked = OnOff; 
			}
		}
	}
}